﻿
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 
 * C O P Y R I G H T    N O T I C E
 * 
 * Copyright (c) 2000-2010 Acidaes Solutions Pvt. Ltd. All Rights Reserved.
 * 
 * This code is a part of the source code used by Acidaes Solution Private Limited for its product "BusinessNext".
 * You may not, directly or indirectly, use, disclose, distribute, print or copy this code or any part of it.
 * 
 * This code contains confidential information and/or may contain information protected by intellectual property 
 * rights or other rights. This code shall/may not be construed to constitute any commitment from 
 * Acidaes Solutions Private Limited or its subsidiaries or affiliates except when expressly agreed to in a 
 * separate written agreement.
 * 
 * AUTHORS:                           DATE:
 * 
 * REVISION: $Revision: 5420 $
 * LAST MODIFIED BY: &Author$ on $Date: 2007-06-16 12:01:05 +0530 (Sat, 16 Jun 2007) $  
 * 
 * R E V I S I O N  H I S T O R Y:
 * 
 * DATE      CHANGED BY               COMMENT     
 * 
 *  
 * C O D E  R E V I E W  H I S T O R Y: 
 * 
 * DATE      REVIEWED BY              COMMENT     
 *  
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Reflection;

namespace Acidaes.Caching
{
    
    public class CacheProviderFactory  
    {
        /// <summary>
        /// Loads an CacheProviderFactory
        /// </summary>
        /// <returns>Instance of an CacheProvider</returns>
        public static CacheProvider Load()
        {
            return (CacheProvider)Create();
        }


        public static CacheProvider Instance;


        private static object Create()
        {
            string path = ConfigurationSettings.AppSettings["cacheProviderPath"];
            string className = ConfigurationSettings.AppSettings["cacheProviderClass"];
            return Assembly.Load(path).CreateInstance(className);
        }
    }
}
